import React from 'react';
import classnames from 'classnames';

export default class view extends React.Component {
    static propTypes = {
        className: React.PropTypes.string,
        type: React.PropTypes.string,
        label: React.PropTypes.string,
        onLeftClick: React.PropTypes.func.isRequired,
        onRightClick: React.PropTypes.func.isRequired,
    };

    static defaultProps = {
        label: '',
        type: 'default' // default || circle
    }

    constructor(props, context) {

        super(props, context);


        // init state;
        this.state = {};
    }
    componentWillMount() {
        this._isMounted = true;

    }

    componentDidMount() {

    }

    componentWillUnmount() {
        this._isMounted = false;
    }

    render() {
        const classNames = classnames({
            'orin-sw-restepper-root': true,
            [this.props.className] : this.props.className ? true : false,
            [this.props.type] : true
        })
        return (
            <div className={ classNames } >
                <dl>
                    <dd className="css-triangle-left" onClick={ () => this.props.onLeftClick() }></dd>
                    <dt> { this.props.label }</dt>
                    <dd className="css-triangle-right" onClick={ () => this.props.onRightClick() }></dd>
                </dl>
            </div>
        );
    }
}
